package com.wxxymaker.model.dao;

import com.wxxymaker.model.entity.Mark;
import com.wxxymaker.model.entity.Stage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface MarkDao extends JpaRepository<Mark, Integer> {

    @Modifying
    @Query("update Mark set can = :can, stage = :stage")
    int setCanAndStage(@Param("can") boolean can, @Param("stage") Stage stage);

    @Modifying
    @Query("update Mark set can = :can")
    int setCan(@Param("can") boolean can);
}
